$( document ).ready( function() {

    var body = $('body').css( {
        'overflow': 'hidden',
        'background-image': [ 'url(', GodTier.CommonLib.makeUrl( { controller: 'static', argList: [ 'images', 'homeBackground.jpg' ] } ), ')' ].join('') } );

    new GodTier.Views['pageHeader']( { el: '#pageHeader' } );

    var buttonContainerHeight = ( $( window ).height() - body.outerHeight( true ) ) / 3;

    new GodTier.Views['homeButton']( { el: '#createTournamentButton',
                                       backgroundImage: { filename: 'createTournament.png',
                                                          height: 68, width: 333 },
                                       redirectLocation: 'create',
                                       events: { 'click': 'redirect' },
                                       color: { light: 'lightblue', dark: 'darkblue' },
                                       height: buttonContainerHeight } );

    new GodTier.Views['homeButton']( { el: '#playInTournamentButton',
                                       backgroundImage: { filename: 'joinTournament.png',
                                                          height: 68, width: 333 },
                                       redirectLocation: 'play',
                                       events: { 'click': 'redirect' },
                                       color: { light: '#ef3d47', dark: 'darkred' },
                                       height: buttonContainerHeight } );

    new GodTier.Views['homeButton']( { el: '#watchTournamentButton',
                                       text: 'Watch Tournament',
                                       redirectLocation: 'watch',
                                       events: { 'click': 'redirect' },
                                       height: buttonContainerHeight,
                                       color: { light: 'lightyellow', dark: '#ffcc00' } } );
} );
